<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>商城网页</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .nav{
            width: 100%;
            height: 50px;
            background-color: rgb(143, 142, 153);
        }
        .nav ul{
            line-height: center;
        }

        .nav ul li{
            list-style: none;
            float: left;
            padding: 10px 20px;
        }
        .nav ul li a{
            color: #000;
            text-decoration: none;
            font-size: 20px;
        }

        .nav-list{
            width: 100%;
            height: 300px;
            position: absolute;
            left: 0;
            background-color: rgb(255, 255, 255);
            display: none;
        }

        .nav ul li:hover .nav-list{
            display: block;
        }

    </style>
</head>
<body>
    <div class="nav">
        <ul>
            <li>
                <a href="#">首页</a>
                <div class="nav-list" style="background-color: rgb(143, 142, 153);"></div>
            </li>
            <li>
                <a href="#">商品</a>
                <div class="nav-list" style="background-color: rgb(54, 41, 204);"></div>
            </li>
            <li>
                <a href="#">关于我们</a>
                <div class="nav-list" style="background-color: rgb(226, 18, 18);"></div>
            </li>
            <li>
                <a href="#">联系我们</a>
                <div class="nav-list" style="background-color: rgb(114, 204, 40);"></div>
            </li>
            <li>
                <a href="#">购物车</a>
                <div class="nav-list" style="background-color: rgb(204, 142, 40);"></div>
            </li>
        </ul>
    </div>
</body>
</html>